#include "ceres/ceres.h"
#include "ceres/rotation.h"
#include "glog/logging.h"

using namespace std;

int main(int argc, char *argv[])
{
    double euler[3] = {0, 0, 0};

    double dataR[9];
    //ceres::MatrixAdapter<double, 3, 3> R(dataR);
    ceres::EulerAnglesToRotationMatrix(euler, 3, dataR);

    double angle_axis[3];
    ceres::RotationMatrixToAngleAxis(dataR, angle_axis);
    cout << "angle_axis: " << angle_axis[0] << ", " << angle_axis[1] <<", " << angle_axis[2] << endl;
    double q[4];
    ceres::RotationMatrixToQuaternion(dataR, q);
    cout << "q: " << q[0] << ", " << q[1] <<", " << q[2] << ", " << q[3] << endl;

    return 0;
}
